From: Florian Müllner Date: Mon, 4 Mar 2013 15:21:57 +0000 (+0100) Subject: st-entry: Disable cut/copy actions in password entries X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4569 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b52f4ed25b00b91264bce6658c1004ad31651689;p=gnome-shell.git st-entry: Disable cut/copy actions in password entries Curently it is possible to copy the content of password entries, and paste it elsewhere in clear text. This is undesirable, so follow GTK+'s behavior and disable the cut/copy actions for password entries. https://bugzilla.gnome.org/show_bug.cgi?id=695104 --- diff --git a/src/st/st-entry.c b/src/st/st-entry.c index 103b8f58c..e3c684d6a 100644 --- a/src/st/st-entry.c +++ b/src/st/st-entry.c @@ -602,7 +602,8 @@ st_entry_key_press_event (ClutterActor *actor, /* copy */ if ((event->modifier_state & CLUTTER_CONTROL_MASK) - && event->keyval == CLUTTER_c) + && event->keyval == CLUTTER_c && + clutter_text_get_password_char ((ClutterText*) priv->entry) == 0) { StClipboard *clipboard; gchar *text; @@ -622,7 +623,8 @@ st_entry_key_press_event (ClutterActor *actor, /* cut */ if ((event->modifier_state & CLUTTER_CONTROL_MASK) - && event->keyval == CLUTTER_x) + && event->keyval == CLUTTER_x && + clutter_text_get_password_char ((ClutterText*) priv->entry) == 0) { StClipboard *clipboard; gchar *text;